<!DOCTYPE html>
<!--
Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
Click nbfs://nbhost/SystemFileSystem/Templates/Scripting/EmptyPHPWebPage.php to edit this template
-->
<html>
    <head>
        <meta charset="UTF-8">
        <title>php的首页</title>
        <style>
            .mys{
                height:100px;
                width:100px;
            }
            .mydiv{
                border: 1px solid black;
                border-radius: 50%;
                height:100px;
                width:100px;
                background-color: rgb(123,43,23);
            }
            </style>
    </head>
    <body>
        
        <div class="mydiv">
            
        </div>
        <?php
        // put your code here
        echo "x=<hr/>";
        echo '1+2<hr/>';
        echo "1+2<br/>";
        echo "我","爱","中华";
        echo "<br/><img class='mys' src='images/AA1nxmpe.png' />";
        $abc=123.45;
        $abc=(int)$abc;
        echo "<br/>";
        echo $abc;
        $abc="china";
        echo "<br/>";
        echo $abc;
        echo "<br/>";
        echo "<br/>abc={$abc}d,变量的声明:\$a=1";
         echo '<br/>abc=$abc';
         
         $str1="1";
         $str2="abc";
         $num1=$str1+$str2;
         echo "<br/>\$num1=$num1";
         $num2=$str2+$str1;
         echo "<br/>\$num2=$num2";
         define("PI",3.1415926);
         echo PI;
         $abc=5>3?1:2;
         echo "<br/>";
         if($abc==1){
             echo "\$abc=1";
         }else{
             echo "\$abc不等于1";
         }
         $index=1;
         while($index<10){
             $size=$index*20+100;
             echo "<br/><img class='mys' style='width:${size}px;height:${size}px'  src='images/img00$index.png' />\n";
             $index++;
         }
         
         $index=1;
         for($index=1;$index<10;$index++){
             $size=$index*20+100;
            echo "<hr/><img class='mys' style='width:${size}px;height:${size}px' src='images/img00$index.png' />"; 
         }
        ?>
        
        <?php
        echo "<br/>我是单独的php语句<br/>"
        ?>
    </body>
</html>
